

@RestController
@RequestMapping("/dmsMachineDeployTemplate")
public class DmsMachineDeployTemplateController {

    @Resource
    private DmsMachineDeployTemplateService dmsMachineDeployTemplateService;


    /**
     * 获取 DmsMachineDeployTemplate 分页列表
     */
    @GetMapping("/pagination")
    public Ret getDmsMachineDeployTemplatePagination( PaginationVo paginationVo, DmsMachineDeployTemplateQuery dmsMachineDeployTemplateQuery ) throws Exception {
        IPage page = dmsMachineDeployTemplateService.getDmsMachineDeployTemplatePagination(paginationVo, dmsMachineDeployTemplateQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 DmsMachineDeployTemplate 所有数据
     */
    @GetMapping("/all")
    public Ret getDmsMachineDeployTemplateAllList( DmsMachineDeployTemplateQuery dmsMachineDeployTemplateQuery ) throws Exception {
        List<DmsMachineDeployTemplateEntity> list = dmsMachineDeployTemplateService.getDmsMachineDeployTemplateAllList( dmsMachineDeployTemplateQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 DmsMachineDeployTemplate 详情
    */
   @GetMapping("/{id}")
   public Ret getDmsMachineDeployTemplateDetail(@PathVariable Long id) throws Exception {

       DmsMachineDeployTemplateEntity dmsMachineDeployTemplate = dmsMachineDeployTemplateService.getDmsMachineDeployTemplateDetail(id);
       return Ret.ok(dmsMachineDeployTemplate);
   }


    /**
     * 新增 DmsMachineDeployTemplate
     * */
    @PostMapping("")
    public Ret addDmsMachineDeployTemplate(@RequestBody DmsMachineDeployTemplateVo dmsMachineDeployTemplateVo) throws Exception {

        dmsMachineDeployTemplateService.addDmsMachineDeployTemplate(dmsMachineDeployTemplateVo);
        return Ret.ok();
    }


    /**
     * 更新 DmsMachineDeployTemplate
     * */
    @PutMapping("")
    public Ret updateDmsMachineDeployTemplate(@RequestBody DmsMachineDeployTemplateVo dmsMachineDeployTemplateVo) throws Exception {

        dmsMachineDeployTemplateService.updateDmsMachineDeployTemplate(dmsMachineDeployTemplateVo);
        return Ret.ok();
    }


    /**
     * 删除 DmsMachineDeployTemplate
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveDmsMachineDeployTemplate( @RequestBody List<Long> ids ) throws Exception {

        dmsMachineDeployTemplateService.batchRemoveDmsMachineDeployTemplate(ids);
        return Ret.ok();
    }
}

  